package com.ruoyi.system.domain;

import java.math.BigDecimal;
import java.util.Date;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 *  商品次卡规则对象 product_pass_card_rules
 *
 * @author ruoyi
 * @date 2025-05-23
 */
public class ProductPassCardRules extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 次卡规则唯一标识符（自增数字ID） */
    private Long id;

    /** 适用门店名称（如"上海旗舰店"） */
    @Excel(name = "适用门店名称")
    private String storeName;

    /** 门店唯一编号（如"STORE001"） */
    @Excel(name = "门店唯一编号")
    private String storeCode;

    /** 商品次卡名称（如"10次瑜伽体验卡"） */
    @Excel(name = "商品次卡名称")
    private String passCardName;

    /** 次卡规则编码（如"YOGA_PASS_10"） */
    @Excel(name = "次卡规则编码")
    private String passCardCode;

    /** 次卡类型（通用次卡可消费任意商品，商品专属次卡仅限指定商品） */
    @Excel(name = "次卡类型", readConverterExp = "通=用次卡可消费任意商品，商品专属次卡仅限指定商品")
    private String passCardType;

    /** 适用商品ID列表（JSON数组，若为通用次卡则为NULL） */
    @Excel(name = "适用商品ID列表", readConverterExp = "J=SON数组，若为通用次卡则为NULL")
    private String validProductIds;

    /** 适用商品名称列表（JSON数组，与valid_product_ids对应） */
    @Excel(name = "适用商品名称列表", readConverterExp = "J=SON数组，与valid_product_ids对应")
    private String validProductNames;

    /** 次卡总可用次数（如10次） */
    @Excel(name = "次卡总可用次数", readConverterExp = "如=10次")
    private Long totalTimes;

    /** 当前剩余可用次数（默认为0，需通过业务逻辑更新） */
    @Excel(name = "当前剩余可用次数", readConverterExp = "默=认为0，需通过业务逻辑更新")
    private Long remainingTimes;

    /** 次卡有效期（天数，从激活日起计算，如90天） */
    @Excel(name = "次卡有效期", readConverterExp = "天=数，从激活日起计算，如90天")
    private Long validDays;

    /** 有效期类型（固定日期：需配合fixed_effective_date使用；激活日期：从首次消费起算） */
    @Excel(name = "有效期类型", readConverterExp = "固=定日期：需配合fixed_effective_date使用；激活日期：从首次消费起算")
    private String effectiveDateType;

    /** 固定生效日期（当effective_date_type为固定日期时生效） */
    @Excel(name = "固定生效日期", readConverterExp = "当=effective_date_type为固定日期时生效")
    private Date fixedEffectiveDate;

    /** 固定失效日期（当effective_date_type为固定日期时生效） */
    @Excel(name = "固定失效日期", readConverterExp = "当=effective_date_type为固定日期时生效")
    private Date fixedExpiryDate;

    /** 次卡销售价格（如199.00元） */
    @Excel(name = "次卡销售价格", readConverterExp = "如=199.00元")
    private BigDecimal price;

    /** 次卡状态 */
    @Excel(name = "次卡状态")
    private String status;

    /** 次卡使用规则说明（如"本卡仅限本人使用，不可转让"） */
    @Excel(name = "次卡使用规则说明")
    private String ruleDescription;

    /** 创建人ID（如系统管理员ID） */
    @Excel(name = "创建人ID", readConverterExp = "如=系统管理员ID")
    private String creatorId;

    /** 创建人姓名（如"王五"） */
    @Excel(name = "创建人姓名")
    private String creatorName;

    /** 手机号 */
    @Excel(name = "手机号")
    private String phone;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }

    public void setStoreName(String storeName)
    {
        this.storeName = storeName;
    }

    public String getStoreName()
    {
        return storeName;
    }

    public void setStoreCode(String storeCode)
    {
        this.storeCode = storeCode;
    }

    public String getStoreCode()
    {
        return storeCode;
    }

    public void setPassCardName(String passCardName)
    {
        this.passCardName = passCardName;
    }

    public String getPassCardName()
    {
        return passCardName;
    }

    public void setPassCardCode(String passCardCode)
    {
        this.passCardCode = passCardCode;
    }

    public String getPassCardCode()
    {
        return passCardCode;
    }

    public void setPassCardType(String passCardType)
    {
        this.passCardType = passCardType;
    }

    public String getPassCardType()
    {
        return passCardType;
    }

    public void setValidProductIds(String validProductIds)
    {
        this.validProductIds = validProductIds;
    }

    public String getValidProductIds()
    {
        return validProductIds;
    }

    public void setValidProductNames(String validProductNames)
    {
        this.validProductNames = validProductNames;
    }

    public String getValidProductNames()
    {
        return validProductNames;
    }

    public void setTotalTimes(Long totalTimes)
    {
        this.totalTimes = totalTimes;
    }

    public Long getTotalTimes()
    {
        return totalTimes;
    }

    public void setRemainingTimes(Long remainingTimes)
    {
        this.remainingTimes = remainingTimes;
    }

    public Long getRemainingTimes()
    {
        return remainingTimes;
    }

    public void setValidDays(Long validDays)
    {
        this.validDays = validDays;
    }

    public Long getValidDays()
    {
        return validDays;
    }

    public void setEffectiveDateType(String effectiveDateType)
    {
        this.effectiveDateType = effectiveDateType;
    }

    public String getEffectiveDateType()
    {
        return effectiveDateType;
    }

    public void setFixedEffectiveDate(Date fixedEffectiveDate)
    {
        this.fixedEffectiveDate = fixedEffectiveDate;
    }

    public Date getFixedEffectiveDate()
    {
        return fixedEffectiveDate;
    }

    public void setFixedExpiryDate(Date fixedExpiryDate)
    {
        this.fixedExpiryDate = fixedExpiryDate;
    }

    public Date getFixedExpiryDate()
    {
        return fixedExpiryDate;
    }

    public void setPrice(BigDecimal price)
    {
        this.price = price;
    }

    public BigDecimal getPrice()
    {
        return price;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }

    public void setRuleDescription(String ruleDescription)
    {
        this.ruleDescription = ruleDescription;
    }

    public String getRuleDescription()
    {
        return ruleDescription;
    }

    public void setCreatorId(String creatorId)
    {
        this.creatorId = creatorId;
    }

    public String getCreatorId()
    {
        return creatorId;
    }

    public void setCreatorName(String creatorName)
    {
        this.creatorName = creatorName;
    }

    public String getCreatorName()
    {
        return creatorName;
    }

    public void setPhone(String phone)
    {
        this.phone = phone;
    }

    public String getPhone()
    {
        return phone;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("storeName", getStoreName())
                .append("storeCode", getStoreCode())
                .append("passCardName", getPassCardName())
                .append("passCardCode", getPassCardCode())
                .append("passCardType", getPassCardType())
                .append("validProductIds", getValidProductIds())
                .append("validProductNames", getValidProductNames())
                .append("totalTimes", getTotalTimes())
                .append("remainingTimes", getRemainingTimes())
                .append("validDays", getValidDays())
                .append("effectiveDateType", getEffectiveDateType())
                .append("fixedEffectiveDate", getFixedEffectiveDate())
                .append("fixedExpiryDate", getFixedExpiryDate())
                .append("price", getPrice())
                .append("status", getStatus())
                .append("ruleDescription", getRuleDescription())
                .append("creatorId", getCreatorId())
                .append("creatorName", getCreatorName())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .append("phone", getPhone())
                .toString();
    }
}
